<form name="forms">
    <div class="row inline-block {{item.itemsPerRow==undefined?'one':item.itemsPerRow}}In{{item.rowItemNum==undefined||item.rowItemNum==''?'1':item.rowItemNum}} {{item.class}} no-margin" ng-repeat="item in infoStruct" ng-init="item.show[offset]=1" style="height: 35px;line-height: normal" ng-mouseenter="pointer=$index" ng-mouseleave="pointer=-1">
        <div class="col-md-3 padding-top-bottom-10 no-padding-lr" ng-if="!item.noneName" ng-style="pointer==$index?bkGrey:bkWhite">
            <span>{{item.name}}</span>
            <span ng-if="(item.show[offset]==0||specialNeed=='WriteOnly')&&item.required" class="font-red padding-top-bottom-10">&nbsp;&nbsp;*</span>
        </div>
        <div class="{{item.noneName?'oneIn1':'col-md-9'}} padding-top-bottom-10 full-height" ng-if="specialNeed=='ReadOnly'||specialNeed!='WriteOnly'&&item.show[offset]==1" ng-style="pointer==$index?bkGrey:bkWhite" ng-dblclick="item.show[offset]=0;getfocus(blockname+''+offset+''+$index)">
            <span ng-if="item.option<2">{{infoTraversal[item.key]}}</span>
            <span ng-if="item.option==2">{{infoTraversal[item.key]|date:"yyyy-MM-dd"}}</span>
            <span ng-if="item.option==3">{{getValue(item.select,infoTraversal[item.key])}}</span>
            <span ng-if="item.option==4">{{infoTraversal[item.key[0]]}}省 {{infoTraversal[item.key[1]]}}市 {{infoTraversal[item.key[2]]}}县</span>
        </div>
        <div class="{{item.noneName?'oneIn1':'col-md-9'}} {{!forms[blockname+'_'+offset+'_'+$index].$dirty?'':forms[blockname+'_'+offset+'_'+$index].$invalid?'has-error':'has-success'}}" ng-if="specialNeed=='WriteOnly'||specialNeed!='ReadOnly'&&item.show[offset]==0" style="height: 35px" ng-style="pointer==$index&&item.show[offset]==0?bkGrey:bkWhite" >
            <div class="row"></div>
            <span ng-if="item.option==0" id="{{blockname+''+offset+''+$index}}"  ng-style="pointer==$index?bkGrey:bkWhite" ng-mouseleave="item.show[offset]=1">{{infoTraversal[item.key]}}<span style="color: red">(只读)</span></span>
            <input ng-change="dirtySet({index:blockname})" name="{{blockname+'_'+offset+'_'+$index}}" type="text" class="form-control no-padding" ng-if="item.option==1" id="{{blockname+''+offset+''+$index}}" ng-model="infoTraversal[item.key]" ng-blur="item.show[offset]=1" ng-required="item.required">
            <div class="input-group" ng-if="item.option==2">
                <input ng-change="dirtySet({index:blockname});item.show[offset]=forms[blockname+'_'+offset+'_'+$index].$valid?1:0" name="{{blockname+'_'+offset+'_'+$index}}" id="{{blockname+''+offset+''+$index}}" type="text" ng-pattern="/^[0-9]{4}-[0-1][0-9]-[0-3][0-9]$/" ng-required="item.required" class="form-control" ng-model="infoTraversal[item.key]" uib-datepicker-popup="yyyy-MM-dd" is-open="opened"/>
                <span class="input-group-btn">
                    <button type="button" class="btn btn-default" ng-click="opened=true"><i class="glyphicon glyphicon-calendar"></i></button>
                </span>
            </div>
            <select ng-change="dirtySet({index:blockname})" name="{{blockname+'_'+offset+'_'+$index}}" class="form-control no-padding"  ng-if="item.option==3" id="{{blockname+''+offset+''+$index}}" ng-model="infoTraversal[item.key]" ng-options="sel.value as sel.name for sel in item.select" ng-blur="item.show[offset]=1" ng-required="item.required">
                <option value="">请选择</option>
            </select>
            <span class="col-md-11 no-padding" ng-if="item.option==4" id="{{blockname+''+offset+''+$index}}" city-select province="infoTraversal[item.key[0]]" city="infoTraversal[item.key[1]]" district="infoTraversal[item.key[2]]"></span>
            <span class="col-md-1 padding-top-bottom-10"><a ng-if="item.option==4" ng-click="item.show[offset]=1;dirtySet({index:blockname})"><i class="fa fa-check"></i></a></span>
        </div>
    </div>
</form>